﻿@{
    ViewBag.Title = "Do";
    Layout = "~/Views/Shared/_LayoutS.cshtml";
}
<h2>
    Do</h2>
<script type="text/javascript">

var types= "@ViewData["TypeS"]";
var operation       =     "@ViewData["Operation"]";
      var requstID   =   "@ViewData["RequestID"]" ;

    function DoRedirect(rowData) {
        var rnd = (new Date()).getMilliseconds() + "" + parseInt(Math.random() * 10000);
        if (rowData.TypeS == "任务") {
            window.open("/PlanManagement/TaskDetail?UserRole=2&ID=" + rowData.RequestID,"_self");
            return false;
        }
        $.ajax({
            url: '/Navigate/GetURL',
            data: { type: rowData.TypeS, requestid: rowData.RequestID, operation: rowData.Operation, nocatch: rnd },
            success: function (result) {
                window.open("/Account/SSO?redirectionUrl=" + encodeURI(result) + "catchid=" + rnd,"_self");
            }

        });
    }

    $(document).ready(function () {
    var rowData=new Object();
    rowData.TypeS=types;
    rowData.RequestID=requstID;
    rowData.Operation=operation;
    DoRedirect(rowData);
    });

</script>
